<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="Responsive Bootstrap 4 Admin &amp; Dashboard Template">
	<meta name="author" content="Bootlab">

	<title> demo_客户_资产_应收账款</title>

	<link href="css/classic.css" rel="stylesheet">
	<link href="css/ext.css" rel="stylesheet">


</head>

<body>
	<div class="wrapper">

		<nav class="sidebar">
			<div class="sidebar-content ">
				<a class="sidebar-brand" href="index.html">
					<i class="align-middle" data-feather="command"></i>
					<span class="align-middle">供应链金融平台</span>
				</a>

				<ul id='sidebar-menu' class="sidebar-nav">
					<script id="script_menu" type="text/x-handlebars-template">

						{{#each menuitems}}
							<li class="sidebar-header">
								{{title}}
							</li>
							{{#if groups}}
								{{#each groups}}
									<li class="sidebar-item" {{#if ../actived }} active {{/if}}>

										<a href="{{href}}" data-toggle="collapse" class="sidebar-link 	{{#if this.actived}} {{else}} collapsed {{/if}}">
											<i class="align-middle" data-feather={{icon}}></i> <span class="align-middle">{{title}}</span>
										</a>

										{{#if items}}
											<ul id="{{id}}" class="sidebar-dropdown list-unstyled collapse  	{{#if this.actived}} show {{else}} {{/if}}">
												{{#each items}}

													<li class="sidebar-item {{#if actived}} active {{/if}}">
														<a class="sidebar-link " href={{href}}>{{title}}</a>
													</li>
												{{/each}}
											</ul>
										{{/if}}
									</li>
								{{/each}}
							{{/if}}
						{{/each}}
					</script>
				</ul>

				<div class="sidebar-bottom d-none d-lg-block">
					<div class="media">
						<img class="rounded-circle mr-3" src="img/avatar.jpg" alt="Chris Wood" width="40" height="40">
						<div class="media-body">
							<h5 class="mb-1 text-white">Chris Wood</h5>
							<div class="text-light">
								<i class="fas fa-circle text-success"></i> Online
							</div>
						</div>
					</div>
				</div>

			</div>
		</nav>

		<div class="main">
			<nav class="navbar navbar-expand navbar-light bg-white">
				<a class="sidebar-toggle d-flex mr-2">
					<i class="hamburger align-self-center"></i>
				</a>

				<form class="form-inline d-none d-sm-inline-block">
					<input class="form-control form-control-no-border mr-sm-2" type="text" placeholder="Search projects..." aria-label="Search">
				</form>


				<div class="navbar-collapse collapse">
					<ul class="navbar-nav ml-auto">
						<li class="nav-item dropdown">
							<a class="nav-icon dropdown-toggle" href="#" id="messagesDropdown" data-toggle="dropdown">
								<div class="position-relative">
									<i class="align-middle" data-feather="message-circle"></i>
									<span class="indicator">4</span>
								</div>
							</a>
							<div id="messages" class="dropdown-menu dropdown-menu-lg dropdown-menu-right py-0" aria-labelledby="messagesDropdown">
								<script id="script_messages" type="text/x-handlebars-template">
									<div class="dropdown-menu-header">
									<div class="position-relative">
											{{total}}  New Messages
									</div>
								</div>
								<div class="list-group">
									{{#each items}}
									<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">

												<img src="{{avatar}}" class="avatar img-fluid rounded-circle" alt="{{who}}">
											</div>
											<div class="col-10 pl-2">
												<div class="text-dark">{{who}}</div>
												<div class="text-muted small mt-1">{{content}}</div>
												<div class="text-muted small mt-1">{{time}}</div>
											</div>
										</div>
									</a>
								 	{{/each}}
								</div>
								<div class="dropdown-menu-footer">
									<a href="#" class="text-muted">Show all messages</a>
								</div>
								</script>
							</div>
						</li>
						<li class="nav-item dropdown">
							<a class="nav-icon dropdown-toggle" href="#" id="alertsDropdown" data-toggle="dropdown">
								<div class="position-relative">
									<i class="align-middle" data-feather="bell-off"></i>
								</div>
							</a>
							<div id="alerts" class="dropdown-menu dropdown-menu-lg dropdown-menu-right py-0" aria-labelledby="alertsDropdown">
								<script id="script_alerts" type="text/x-handlebars-template">
									<div class="dropdown-menu-header">
									{{total}} New Notifications
								</div>
								<div class="list-group">
									{{#each items}}
										<a href="#" class="list-group-item">
										<div class="row no-gutters align-items-center">
											<div class="col-2">
													<i class="text-danger" data-feather="alert-circle"></i>
											</div>
											<div class="col-10">
												<div class="text-dark">{{title}}</div>
												<div class="text-muted small mt-1">{{content}}</div>
												<div class="text-muted small mt-1">{{time}}</div>
											</div>
										</div>
									</a>
									{{/each}}
								</div>
								<div class="dropdown-menu-footer">
									<a href="#" class="text-muted">Show all notifications</a>
								</div>
								</script>
							</div>
						</li>
						<li class="nav-item dropdown">
							<a class="nav-link dropdown-toggle" href="#" id="userDropdown" data-toggle="dropdown">
								<span class="d-inline-block d-md-none">
									<i class="align-middle" data-feather="settings"></i>
								</span>
								<span class="d-none d-sm-inline-block">
									<img src="img/avatar.jpg" class="avatar img-fluid rounded-circle mr-1" alt="Chris Wood" /> <span class="text-dark">Chris Wood</span>
								</span>
							</a>
							<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
								<a class="dropdown-item" href="#"><i class="align-middle mr-1" data-feather="user"></i>
									Profile</a>
								<a class="dropdown-item" href="#"><i class="align-middle mr-1" data-feather="pie-chart"></i> Analytics</a>
								<div class="dropdown-divider"></div>
								<a class="dropdown-item" href="#">Settings & Privacy</a>
								<a class="dropdown-item" href="#">Help</a>
								<a class="dropdown-item" href="#">Sign out</a>
							</div>
						</li>
					</ul>
				</div>
			</nav>

			<main class="content">
				<div class="container-fluid p-0">
					<div class="row">
						<div class="col-md-3 col-xl-3">
							<div class="card mb-3">
								<div class="card-body text-center">
									<img src="img/avatar/default-avatar_corp.png" alt="Chris Wood" class="img-fluid rounded-circle mb-2" width="128" height="128" />
									<h4 class="card-title mb-0">瑞康医药</h4>
									<div class="text-muted mb-2">客户号：22212213</div>

									<div>
										<a class="btn btn-primary btn-sm" href="#">应收E</a>
										<a class="btn btn-primary btn-sm" href="#"><span data-feather=""></span>
											2020-07-01</a>
									</div>
								</div>
							</div>


						</div>
						<div class="col-md-9 col-xl-9">
							<div class="card">
								<div class="card-header">

									<h5 class="card-title mb-0">流程中待审核资产列表</h5>
								</div>
								<div class="card-body">
									<table class="table" id="table_asset_in_process">
										<thead>
											<tr>
												<th style="width:15%">资产编号</th>
												<th style="width:15%">资产金额</th>
												<th style="width:10%">资产形态</th>
												<th style="width:15%">流程状态</th>
												<th style="width:15%">流程节点</th>
												<th style="width:20%">单据数量</th>
												<th>详情</th>
											</tr>
										</thead>
										<tbody>

										</tbody>
									</table>
									<script>
										document.addEventListener("DOMContentLoaded", function() {

											// 定义的数组,根据数组,渲染生成页面内容
											var arr = [
												['A10001', 2000000, '池', 1, '详情', '100', ''],
												['A10002', 1813000, '池', 0, '详情', '240', ''],
												['A10012', 1180011, '笔', 1, '详情', '1', ''],
												['A12320', 1071230, '包', 1, '详情', '12', '']
											];

											// 定义变量,存储要写入的内容
											$('#table_asset_in_process').DataTable({
												data: arr,
												searching: true,
												ordering: false,
												"order": [
													[4, "desc"]
												],
												columns: [{

														//column1 资产编号
													},
													{
														//column2 资产金额
													},

													{
														//column5 资产形态
													},


													{
														//column7 资产状态

														render: function(data, type, row, meta) {

															html_content = ''
															if (data == '1') {
																html_content = `<a href="#" class="badge badge-success mr-1 my-1"> 审批中</a>`
															} else {
																html_content = `<a href="#" class="badge badge-warning mr-1 my-1"> 退回</a>`
															}
															return type === 'display' ? html_content : data

														}
													},

													{
														render: function(data, type, row, meta) {
															html_content = `<a href="#" > 详情</a>`
															return type === 'display' ? html_content : data

														}
													},

													{

													},

													{
														//column9 详情
														render: function(data, type, row, meta) {

															html_content = `<td> <a href="demo_客户_资产_应收账款_detail.html"><i class="fas fa-eye  text-primary"></i></a>
														 </td>`
															return html_content
														}

													}
												]
											});

										});
									</script>
								</div>

							</div>
							<div class="card">
								<div class="card-header">

									<h5 class="card-title mb-0">已保存未提交的资产列表</h5>
								</div>
								<div class="card-body">
									<table class="table" id="table_asset_in_draft">
										<thead>
											<tr>
												<th style="width:15%;">资产编号</th>
												<th style="width:15%">资产金额</th>
												<th style="width:10%">资产形态</th>
												<th style="width:15%">流程状态</th>
												<th style="width:20%">单据数量</th>
												<th>详情</th>
											</tr>
										</thead>
										<tbody>

										</tbody>
									</table>
									<script>
										document.addEventListener("DOMContentLoaded", function() {

											// 定义的数组,根据数组,渲染生成页面内容
											var arr = [
												['A10001', 2000000, '池', 100000, 2, '100', ''],
												['A10002', 1813000, '池', 40000, 2, '240', ''],
												['A10012', 1180011, '笔', 100000, 2, '1', ''],
												['A12320', 1071230, '包', 70000, 2, '12', '']
											];

											// 定义变量,存储要写入的内容
											$('#table_asset_in_draft').DataTable({
												data: arr,
												searching: true,
												ordering: false,
												"order": [
													[4, "desc"]
												],
												columns: [{

														//column1 资产编号
													},
													{
														//column2 资产金额
													},


													{
														//column5 资产形态
													},


													{
														//column7 资产状态

														render: function(data, type, row, meta) {

															html_content = `<a href="#" class="badge badge-info mr-1 my-1"> 草稿</a>`


															return type === 'display' ? html_content : data

														}
													},
													{
														//column8 单据数量
													},

													{
														//column9 详情
														render: function(data, type, row, meta) {

															html_content = `<td> <a href="demo_客户_资产_应收账款_detail.html"><i class="fas fa-edit  text-primary"></i></a>
																<a href="#" data-toggle="modal"
											data-target="#centeredModalSuccess"><i class="fas fa-minus text-primary"></i></a></td>`
															return html_content
														}

													}
												]
											});

										});
									</script>
								</div>

							</div>
							<div class="modal fade" id="centeredModalSuccess" tabindex="-1" role="dialog" aria-hidden="true">
								<div class="modal-dialog modal-dialog-centered" role="document">
									<div class="modal-content">
										<div class="modal-header">
											<h5 class="modal-title">提示框</h5>
											<button type="button" class="close" data-dismiss="modal" aria-label="Close">
												<span aria-hidden="true">&times;</span>
											</button>
										</div>
										<div class="modal-body m-3">
											<p class="mb-0">确认删除此资产包</p>
										</div>
										<div class="modal-footer">
											<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
											<button type="button" class="btn btn-success">确认
											</button>
										</div>
									</div>
								</div>
							</div>
							<!-- END success modal -->

						</div>

					</div>

				</div>
			</main>

			<footer class="footer">
				<div class="container-fluid">
					<div class="row text-muted">
						<div class="col-6 text-left">
							<ul class="list-inline">
								<li class="list-inline-item">
									<a class="text-muted" href="#">Support</a>
								</li>
								<li class="list-inline-item">
									<a class="text-muted" href="#">Help Center</a>
								</li>
								<li class="list-inline-item">
									<a class="text-muted" href="#">Privacy</a>
								</li>
								<li class="list-inline-item">
									<a class="text-muted" href="#">Terms of Service</a>
								</li>
							</ul>
						</div>
						<div class="col-6 text-right">
							<p class="mb-0">
								&copy; 2018 - <a href="index.html" class="text-muted">AppStack</a>
							</p>
						</div>
					</div>
				</div>
			</footer>
		</div>


	</div>
	<script src="js/app.js"></script>
	<script src="js/initDataTables.js"></script>
	<script src="js/libs/handlebars/handlebars.min-v4.7.7.js"></script>
	<script src="js/initMenuMessageAlert.js"></script>

	<script type="text/javascript">
		document.addEventListener("DOMContentLoaded", function() {

			initSidebarMenu(2, 1, 0)

			var tpl_siderbar = $("#script_menu").html();
			var template_sdb = Handlebars.compile(tpl_siderbar);
			var content = template_sdb(menu_json_data);
			$("#sidebar-menu").html(content)

			//模版渲染
			var tpl_alerts = $("#script_alerts").html();
			var template_alt = Handlebars.compile(tpl_alerts);
			var content = template_alt(alerts);
			$("#alerts").html(content)



			//模版渲染
			var tpl_messages = $("#script_messages").html();
			var template_msg = Handlebars.compile(tpl_messages);
			var content = template_msg(messages);
			$("#messages").html(content)



		});
	</script>





	<script>
		Handlebars.registerHelper("debug", function(optionalValue) {


			if (optionalValue) {


				console.log("==========begin==========");

				console.log(optionalValue);

				console.log("========== end ==========");

			}


		});
		Handlebars.registerHelper('ifCond', function(v1, operator, v2, options) {

			switch (operator) {
				case '==':
					return (v1 == v2) ? options.fn(this) : options.inverse(this);
				case '===':
					return (v1 === v2) ? options.fn(this) : options.inverse(this);
				case '!=':
					return (v1 != v2) ? options.fn(this) : options.inverse(this);
				case '!==':
					return (v1 !== v2) ? options.fn(this) : options.inverse(this);
				case '<':
					return (v1 < v2) ? options.fn(this) : options.inverse(this);
				case '<=':
					return (v1 <= v2) ? options.fn(this) : options.inverse(this);
				case '>':
					return (v1 > v2) ? options.fn(this) : options.inverse(this);
				case '>=':
					return (v1 >= v2) ? options.fn(this) : options.inverse(this);
				case '&&':
					return (v1 && v2) ? options.fn(this) : options.inverse(this);
				case '||':
					return (v1 || v2) ? options.fn(this) : options.inverse(this);
				default:
					return options.inverse(this);
			}
		});
	</script>

</body>

</html>
